<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>测试标准变量表达式</title>
</head>
<body>
    <table align="center">
        <tr>
            <td>姓名</td>
            <td><p th:text="${name}"></p></td>
        </tr>
        <tr>
            <td>年龄</td>
            <td><p th:text="${age}"></p></td>
        </tr>
        <tr>
            <td>已婚</td>
            <td><p th:text="${married}"></p></td>
        </tr>
    </table>

    <hr/>

    <table align="center">
        <tr>
            <td>编号</td>
            <td><p th:text="${user.getId()}"></p></td>
        </tr>
        <tr>
            <td>姓名</td>
            <td><p th:text="${user.getName()}"></p></td>
        </tr>
        <tr>
            <td>年龄</td>
            <td><p th:text="${user.age}"></p></td>
        </tr>
        <tr>
            <td>性别</td>
            <td><p th:text="${user.gender}"></p></td>
        </tr>
        <tr>
            <td>信息</td>
            <td><p th:text="${user.info}"></p></td>
        </tr>
        <tr>
            <td>汽车的品牌</td>
            <td><p th:text="${user.car.brand}"></p></td>
        </tr>
        <tr>
            <td>汽车的颜色</td>
            <td><p th:text="${user.getCar().getColor()}"></p></td>
        </tr>
    </table>
</body>
</html>